<?php if ( have_posts() ) : while ( have_posts() ) :   the_post(); ?>				
		<div class="card p2 shadow-sm mt-3">
			<div class="card-body">
				<h1 class="card-title"><?php the_title() ?></h1>
				<h6 class="card-subtitle mt-3 text-muted">
					<span class="badge text-bg-success"><?php the_time('Y-m-d')?></span>
					<span class="badge text-bg-warning"><?php the_author();?></span>
				</h6>
				<hr>
				
				<div class="mt-3">
					<div class="entry-content">
						<?php the_content();?>							
					</div>				
					<?php setPostViews(get_the_ID()); ?>
					<?php 
						if ( comments_open() || get_comments_number() ) {
						comments_template();
					}?>							
				</div>
			</div>
		</div>
	<?php endwhile; else: ?>
	<p>There no posts to show</p>
<?php endif; wp_reset_query();?>
